// gamewindow.h
#ifndef GAMEWINDOW_H
#define GAMEWINDOW_H

#include <QMainWindow>
#include <QMenuBar>
#include "gamecore.h"
#include "renderer.h"
#include "inputhandler.h"
#include "levelmanager.h"
#include "config.h"

class GameWindow : public QMainWindow {
    Q_OBJECT

public:
    GameWindow(QWidget *parent = nullptr);
    ~GameWindow() override;

private:
    GameCore *m_gameCore;
    Renderer *m_renderer;
    InputHandler *m_inputHandler;
    LevelManager *m_levelManager;
    Config *m_config;

    void initUI();
    void initMenu();
    void connectSignals();

private slots:
    void onGameStateChanged(GameState state);
    void onLevelChanged(int current, int total);
    void onLevelLoaded(const MapData &mapData);
    void onLoadFailed(const QString &error);
    void showAboutDialog();
};

#endif // GAMEWINDOW_H
